<template>
  <div class="nav-container">
    <div class="nav-top">
      <div class="container">
        <div class="nav-left">
          <span>小米商城</span>
        </div>
        <div class="nav-right">
          <el-menu mode="horizontal" :router="true">
            <el-menu-item index="/">首页</el-menu-item>
            <el-menu-item index="/products">商品</el-menu-item>
            <el-menu-item index="/cart">购物车</el-menu-item>
            <el-menu-item index="/login">登录</el-menu-item>
            <el-menu-item index="/register">注册</el-menu-item>
          </el-menu>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NavBar'
}
</script>

<style scoped>
.nav-container {
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-top {
  height: 60px;
  line-height: 60px;
}

.container {
  max-width: 1226px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  font-size: 24px;
  font-weight: bold;
  color: #ff6700;
}

.nav-right {
  flex: 1;
  text-align: right;
}

.el-menu {
  border-bottom: none;
  background-color: transparent;
}

.el-menu-item {
  font-size: 16px;
  color: #333;
}

.el-menu-item:hover {
  color: #ff6700;
}
</style> 